Skip to content

fix(desktop): connect to the server already using the T3 home - #165

Merged
ScriptedAlchemy merged 1 commit into
mainfrom
codex/spark-desktop-home-relaunch
Nov 19, 2026
Merged

ScriptedAlchemy merged 1 commit into
mainfrom
codex/spark-desktop-home-relaunch

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Opening Desktop after an SSH connection started a standalone server against the same T3 home made Desktop quit with “This T3 home is unavailable.” On a Linux Spark running Nightly .211, that server was healthy and serving the original environment.

Desktop now uses the existing server when it proves ownership of the same unmanaged home. Desktop issues a scoped session through its bundled CLI and verifies the environment ID, port and fresh challenge over loopback before exposing the session to the renderer. This also handles a server winning the lock during startup. Desktop leaves the external process running on quit and revokes its own session. Sharing settings reflect which process controls the listener.

Verified with two native Electron launches against an isolated standalone .211 server. Desktop opened the seeded project and its authenticated session returned HTTP 200. The same server PID still served discovery after quit, and the desktop session was revoked. The wrong environment ID failed verification. The second launch also verified the sharing settings against a loopback-only server.

The changed-file gate passed with 62 tests and type checks across 38 affected packages.

Implemented and tested with GPT-6 in Codex Desktop.

@changeset-bot

changeset-bot Bot commented Nov 19, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f88dc8b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy
ScriptedAlchemy merged commit 5536c09 into main Nov 19, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant